Optimal. Leaf size=41 \[ \frac{\tan ^{-1}(\sinh (x))}{a}-\frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sinh (x)}{\sqrt{a+b}}\right )}{a \sqrt{a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0535018, antiderivative size = 41, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.308, Rules used = {3186, 391, 203, 205} \[ \frac{\tan ^{-1}(\sinh (x))}{a}-\frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sinh (x)}{\sqrt{a+b}}\right )}{a \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3186
Rule 391
Rule 203
Rule 205
Rubi steps
\begin{align*} \int \frac{\text{sech}(x)}{a+b \cosh ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\sinh (x)\right )\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\sinh (x)\right )}{a}-\frac{b \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\sinh (x)\right )}{a}\\ &=\frac{\tan ^{-1}(\sinh (x))}{a}-\frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \sinh (x)}{\sqrt{a+b}}\right )}{a \sqrt{a+b}}\\ \end{align*}
Mathematica [A] time = 0.0954587, size = 45, normalized size = 1.1 \[ \frac{\sqrt{b} \tan ^{-1}\left (\frac{\sqrt{a+b} \text{csch}(x)}{\sqrt{b}}\right )}{a \sqrt{a+b}}+\frac{2 \tan ^{-1}\left (\tanh \left (\frac{x}{2}\right )\right )}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.039, size = 83, normalized size = 2. \begin{align*} -{\frac{1}{a}\sqrt{b}\arctan \left ({\frac{1}{2} \left ( 2\,\tanh \left ( x/2 \right ) \sqrt{a+b}+2\,\sqrt{a} \right ){\frac{1}{\sqrt{b}}}} \right ){\frac{1}{\sqrt{a+b}}}}+{\frac{1}{a}\sqrt{b}\arctan \left ({\frac{1}{2} \left ( -2\,\tanh \left ( x/2 \right ) \sqrt{a+b}+2\,\sqrt{a} \right ){\frac{1}{\sqrt{b}}}} \right ){\frac{1}{\sqrt{a+b}}}}+2\,{\frac{\arctan \left ( \tanh \left ( x/2 \right ) \right ) }{a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{2 \, \arctan \left (e^{x}\right )}{a} - 2 \, \int \frac{b e^{\left (3 \, x\right )} + b e^{x}}{a b e^{\left (4 \, x\right )} + a b + 2 \,{\left (2 \, a^{2} + a b\right )} e^{\left (2 \, x\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.29607, size = 1096, normalized size = 26.73 \begin{align*} \left [\frac{\sqrt{-\frac{b}{a + b}} \log \left (\frac{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} - 2 \,{\left (2 \, a + 3 \, b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b \cosh \left (x\right )^{2} - 2 \, a - 3 \, b\right )} \sinh \left (x\right )^{2} + 4 \,{\left (b \cosh \left (x\right )^{3} -{\left (2 \, a + 3 \, b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \,{\left ({\left (a + b\right )} \cosh \left (x\right )^{3} + 3 \,{\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} +{\left (a + b\right )} \sinh \left (x\right )^{3} -{\left (a + b\right )} \cosh \left (x\right ) +{\left (3 \,{\left (a + b\right )} \cosh \left (x\right )^{2} - a - b\right )} \sinh \left (x\right )\right )} \sqrt{-\frac{b}{a + b}} + b}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \,{\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \,{\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \,{\left (b \cosh \left (x\right )^{3} +{\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right ) + 4 \, \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{2 \, a}, -\frac{\sqrt{\frac{b}{a + b}} \arctan \left (\frac{1}{2} \, \sqrt{\frac{b}{a + b}}{\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}\right ) + \sqrt{\frac{b}{a + b}} \arctan \left (\frac{{\left (b \cosh \left (x\right )^{3} + 3 \, b \cosh \left (x\right ) \sinh \left (x\right )^{2} + b \sinh \left (x\right )^{3} +{\left (4 \, a + 3 \, b\right )} \cosh \left (x\right ) +{\left (3 \, b \cosh \left (x\right )^{2} + 4 \, a + 3 \, b\right )} \sinh \left (x\right )\right )} \sqrt{\frac{b}{a + b}}}{2 \, b}\right ) - 2 \, \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{a}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}{\left (x \right )}}{a + b \cosh ^{2}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]